<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <ul class="layui-nav layui-bg" style="background-color: #f25807" lay-bar="disabled" th:fragment="top">
        <li class="layui-nav-item">小米商城</li>
        <li class="layui-nav-item"><a th:href="@{/index}">首页</a></li>
        <li class="layui-nav-item"><a th:href="@{/buy/car}">购物车</a></li>

        <li class="layui-nav-item" style="margin-right: 0px;float: right"><a th:href="@{/account/logout}">注销</a></li>
        <li class="layui-nav-item" style="right: 0px; float: right"><a th:href="@{${session.loginUser==null?'/login':'/account/myinfo'}}" th:text="${session.loginUser==null?'请登录(游客)':session.loginUser.getName()}">用户名称</a></li>
        <li class="layui-nav-item" style="right: 0px;float: right"><a th:href="@{/account/my}">我的</a></li>
    </ul>


    <ul class="layui-nav layui-bg" style="background-color: #f25807" lay-bar="disabled" th:fragment="admintop">
        <li class="layui-nav-item">小米商城管理端</li>
        <li class="layui-nav-item"><a th:href="@{/admin/index}">首页</a></li>
        <li class="layui-nav-item"><a th:href="@{/admin/order/1}">订单管理</a></li>
        <li class="layui-nav-item"><a th:href="@{/admin/toGood}">商品管理</a></li>

        <li class="layui-nav-item" style="margin-right: 0px;float: right"><a th:href="@{/account/logout}">注销</a></li>
        <li class="layui-nav-item" style="right: 0px; float: right"><a th:href="@{${session.loginUser==null?'/login':'/account/myinfo'}}" th:text="${session.loginUser==null?'请登录(游客)':session.loginUser.getName()+'(管理员)'}">用户名称</a></li>
<!--        <li class="layui-nav-item" style="right: 0px;float: right"><a th:href="@{/account/my}">我的</a></li>-->
    </ul>
</body>
</html>